home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / Crossword / Source / CrosswordSquare.h < prev    next >
Text File  |  1995-06-12  |  1KB  |  52 lines

  1. /*
  2.  
  3. File CrosswordSquare.h
  4.  
  5. Crossword squares are the elements of a crossword matrix.  Each square is either transparent, in which case it appears as black, or contains a letter.  A square with a letter may be drawn using any color combination.  A square can also display a clue number in its upper left hand corner.
  6.  
  7. */
  8.  
  9. #import <appkit/Cell.h>
  10. #import <appkit/color.h>
  11.  
  12.  
  13. /* ————————————————————————————————————————————————————————————————————————————  */
  14.  
  15.  
  16. #define    EMPTY    -1
  17.  
  18. typedef struct {
  19.                     NXColor        background;
  20.                     NXColor        text;
  21.     } squareColor;
  22.  
  23.  
  24. /* ————————————————————————————————————————————————————————————————————————————  */
  25.  
  26.  
  27. @interface CrosswordSquare:Cell
  28. {
  29.     BOOL            opaque;
  30.     char            letter;
  31.     int                number;
  32.     squareColor        color;
  33.     id                data;
  34. }
  35.  
  36. - (BOOL) isOpaque;
  37. - (char) getLetter;
  38. - (int) getNumber;
  39. - (squareColor) getColor;
  40. - (id) getData;
  41. - setLetter: (char) theLetter;
  42. - setNumber: (int) theNumber;
  43. - setColor: (squareColor) theColor;
  44. - setData: (id) theData;
  45. - init;
  46. - write: (NXTypedStream *) stream;
  47. - read: (NXTypedStream *) stream;
  48. - (BOOL) startTrackingAt: (NXPoint *) point  inView: (id) matrix;
  49. - paint: (id) matrix;
  50. - drawInside: (const NXRect *) frame  inView: (id) matrix;
  51.  
  52. @end